﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Automobile.service.DAL;
using Automobile.service.Model;
using System.Data;

namespace Automobile.service.BLL
{
    public class JournalBLL
    {
        JournalDAL dal = new JournalDAL();
        /// <summary>
        /// 日志管理——显示
        /// </summary>
        /// <returns></returns>
        public DataTable ShowJournal(int id)
        {
            return dal.ShowJournal(id);
        }
        /// <summary>
        /// 日志管理——根据登录人显示日志条数
        /// </summary>
        /// <returns></returns>
        public string GetJournaCount(int id)
        {
            return dal.GetJournaCount(id);
        }
        /// <summary>
        /// 日志管理——清空
        /// </summary>
        /// <returns></returns>
        public int TruncateJournal(int id)
        {
            return dal.TruncateJournal(id);
        }
        /// <summary>
        /// 日志管理——根据日志内容模糊查询
        /// </summary>
        /// <param name="JournalContent"></param>
        /// <returns></returns>
        public DataTable GetJournalByJournalContent(int id,string JournalContent)
        {
            return dal.GetJournalByJournalContent(id,JournalContent);
        }
        /// <summary>
        /// 日志管理——添加仓库信息添加的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_AddWareHose(int empid, WareHose w)
        {
            return dal.AddJourna_AddWareHose(empid,w);
        }
        /// <summary>
        /// 日志管理——添加仓库信息删除的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_DelWareHose(int empid, string id)
        {
            return dal.AddJourna_DelWareHose(empid,id);
        }
        /// <summary>
        /// 日志管理——添加仓库信息更新的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_UpdWareHose(int empid, WareHose w)
        {
            return dal.AddJourna_UpdWareHose(empid,w);
        }
        /// <summary>
        /// 日志管理——添加供应商信息删除的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_DelSupplier(int empid, string id)
        {
            return dal.AddJourna_DelSupplier(empid,id);
        }
        /// <summary>
        /// 日志管理——添加供应商信息添加的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_AddSupplier(int empid, Supplier s)
        {
            return dal.AddJourna_AddSupplier(empid,s);
        }
        /// <summary>
        /// 日志管理——添加供应商信息添加的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_uptSupplier(int empid, Supplier s)
        {
            return dal.AddJourna_uptSupplier(empid,s);
        }
        /// <summary>
        /// 日志管理——添加库存信息添加的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_AddStock(int empid, Stock s)
        {
            return dal.AddJourna_AddStock(empid,s);
        }
        /// <summary>
        /// 日志管理——添加库存信息删除的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_DelStock(int empid, string id)
        {
            return dal.AddJourna_DelStock(empid,id);
        }
        /// <summary>
        /// 日志管理——添加库存信息修改的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_UpdStockById(int empid, Stock s)
        {
            return dal.AddJourna_UpdStockById(empid,s);
        }
        /// <summary>
        /// 日志管理——添加更新会员状态的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public int AddJourna_UptMemberCard_StateByID(int empid, int MemberCard_Id)
        {
            return dal.AddJourna_UptMemberCard_StateByID(empid,MemberCard_Id);
        }
        /// <summary>
        /// 日志管理——添加修改会员信息的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public int AddJourna_UptMemberCardByID(int empid, MemberCard m)
        {
            return dal.AddJourna_UptMemberCardByID(empid,m);
        }
        /// <summary>
        /// 日志管理——添加添加会员信息的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public int AddJourna_AddMemberCard(int empid, MemberCard m)
        {
            return dal.AddJourna_AddMemberCard(empid,m);
        }
        /// <summary>
        /// 日志管理——添加删除会员信息的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public int AddJourna_DelMemberCard(int empid, string id)
        {
            return dal.AddJourna_DelMemberCard(empid,id);
        }
        /// <summary>
        /// 日志管理——添加登录系统记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public int AddJourna_Landing(int empid)
        {
            return dal.AddJourna_Landing(empid);
        }
        /// <summary>
        /// 日志管理——添加更新员工信息记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public int AddJourna_UpdEmployeeByempid(int empid, Employee emp)
        {
            return dal.AddJourna_UpdEmployeeByempid(empid,emp);
        }
        /// <summary>
        /// 日志管理——添加员工状态停用记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public int AddJourna_Updempstatefalse(int empid, int id)
        {
            return dal.AddJourna_Updempstatefalse(empid,id);
        }
        /// <summary>
        /// 日志管理——添加员工状态启用记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public int AddJourna_Updempstatetrue(int empid, int id)
        {
            return dal.AddJourna_Updempstatetrue(empid,id);
        }
        /// <summary>
        /// 日志管理——添加员工信息日志
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_AddEmp(int empid, Employee e)
        {
            return dal.AddJourna_AddEmp(empid,e);
        }
        /// <summary>
        /// 日志管理——添加零售订单添加的记录
        /// </summary>
        /// <param name="empid"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddJourna_AddShioments(int empid, Shipments sp)
        {
            return dal.AddJourna_AddShioments(empid,sp);
        }
    }
}
